import 'package:get/get.dart';
import 'package:school_assistant_m/store/login_store.dart';

class MineController extends GetxController {
  //TODO: Implement MineController
  String userName = '';
  String role = '';
  String sex = '';
  String grade = '';
  String realName = '';
  final LoginStore store = LoginStore();

  @override
  void onInit() {
    super.onInit();
    getUserInfo();
  }

  void getUserInfo() async{
    userName = await store.getUsername();
    realName = await store.getRealname();
    role = await store.getRole();
    sex = await store.getSex();
    grade = await store.getGrade();
    // print('***************************');
    // print(await store.getAvatar());
    update(['userInfo']);
  }
}
